﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using DomainDriver.DomainModeling.StorageManagers.EntityFrameworkStorage;
using AutomotivePricingModel.ValueObjects.YearlyFinancialAssessments;

namespace AutomotivePricingModel.ValueObjects.UnitTests.YearlyFinancialAssessments
{
    public class TestDatabaseContext : DbContext
    {
        private static string s_DefaultConnectionName = "TestYearlyFinancialAssessmentsDatabase";

        public static string DefaultConnectionName
        {
            get { return s_DefaultConnectionName; }
            set { s_DefaultConnectionName = value; }
        }

        public TestDatabaseContext()
            : this(DefaultConnectionName)
        { }

        public TestDatabaseContext(string nameOrConnectionString)
            : base(nameOrConnectionString)
        { }

        public DbSet<YearlyFinancialAssessment> YearlyFinancialAssessments { get; set; }
        public DbSet<YearValueObservation> YearValueObservations { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            ForcedMappingUtilities.CreateForcedMappings(this, modelBuilder);
        }
    }
}